Optimal. Leaf size=179 \[ \frac {(5 A+19 B-75 C) \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{16 \sqrt {2} a^{5/2} d}-\frac {(A-B+C) \sec ^2(c+d x) \tan (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}-\frac {(3 A+5 B-13 C) \tan (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}+\frac {(A-B+9 C) \tan (c+d x)}{4 a^2 d \sqrt {a+a \sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.34, antiderivative size = 179, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.116, Rules used = {4169, 4093,
4086, 3880, 209} \begin {gather*} \frac {(5 A+19 B-75 C) \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{16 \sqrt {2} a^{5/2} d}+\frac {(A-B+9 C) \tan (c+d x)}{4 a^2 d \sqrt {a \sec (c+d x)+a}}-\frac {(A-B+C) \tan (c+d x) \sec ^2(c+d x)}{4 d (a \sec (c+d x)+a)^{5/2}}-\frac {(3 A+5 B-13 C) \tan (c+d x)}{16 a d (a \sec (c+d x)+a)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 3880
Rule 4086
Rule 4093
Rule 4169
Rubi steps
\begin {align*} \int \frac {\sec ^2(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{5/2}} \, dx &=-\frac {(A-B+C) \sec ^2(c+d x) \tan (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {\int \frac {\sec ^2(c+d x) \left (2 a (A+B-C)+\frac {1}{2} a (A-B+9 C) \sec (c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx}{4 a^2}\\ &=-\frac {(A-B+C) \sec ^2(c+d x) \tan (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}-\frac {(3 A+5 B-13 C) \tan (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}-\frac {\int \frac {\sec (c+d x) \left (-\frac {3}{4} a^2 (3 A+5 B-13 C)-a^2 (A-B+9 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{8 a^4}\\ &=-\frac {(A-B+C) \sec ^2(c+d x) \tan (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}-\frac {(3 A+5 B-13 C) \tan (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}+\frac {(A-B+9 C) \tan (c+d x)}{4 a^2 d \sqrt {a+a \sec (c+d x)}}+\frac {(5 A+19 B-75 C) \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx}{32 a^2}\\ &=-\frac {(A-B+C) \sec ^2(c+d x) \tan (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}-\frac {(3 A+5 B-13 C) \tan (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}+\frac {(A-B+9 C) \tan (c+d x)}{4 a^2 d \sqrt {a+a \sec (c+d x)}}-\frac {(5 A+19 B-75 C) \text {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{16 a^2 d}\\ &=\frac {(5 A+19 B-75 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{16 \sqrt {2} a^{5/2} d}-\frac {(A-B+C) \sec ^2(c+d x) \tan (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}-\frac {(3 A+5 B-13 C) \tan (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}+\frac {(A-B+9 C) \tan (c+d x)}{4 a^2 d \sqrt {a+a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 4 vs. order 3 in
optimal.
time = 25.51, size = 7172, normalized size = 40.07 \begin {gather*} \text {Result too large to show} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(869\) vs.
\(2(156)=312\).
time = 0.17, size = 870, normalized size = 4.86
method | result | size |
default | \(-\frac {\sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (-1+\cos \left (d x +c \right )\right )^{2} \left (-5 A \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}-19 B \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}+75 C \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}-10 A \sin \left (d x +c \right ) \cos \left (d x +c \right ) \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}-38 B \sin \left (d x +c \right ) \cos \left (d x +c \right ) \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}+150 C \sin \left (d x +c \right ) \cos \left (d x +c \right ) \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}+2 A \left (\cos ^{3}\left (d x +c \right )\right )-5 A \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-18 B \left (\cos ^{3}\left (d x +c \right )\right )-19 B \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+98 C \left (\cos ^{3}\left (d x +c \right )\right )+75 C \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+8 A \left (\cos ^{2}\left (d x +c \right )\right )-8 B \left (\cos ^{2}\left (d x +c \right )\right )+72 C \left (\cos ^{2}\left (d x +c \right )\right )-10 A \cos \left (d x +c \right )+26 B \cos \left (d x +c \right )-106 C \cos \left (d x +c \right )-64 C \right )}{32 d \sin \left (d x +c \right )^{5} a^{3}}\) | \(870\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 4.33, size = 516, normalized size = 2.88 \begin {gather*} \left [\frac {\sqrt {2} {\left ({\left (5 \, A + 19 \, B - 75 \, C\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (5 \, A + 19 \, B - 75 \, C\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (5 \, A + 19 \, B - 75 \, C\right )} \cos \left (d x + c\right ) + 5 \, A + 19 \, B - 75 \, C\right )} \sqrt {-a} \log \left (-\frac {2 \, \sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 3 \, a \cos \left (d x + c\right )^{2} - 2 \, a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) + 4 \, {\left ({\left (A - 9 \, B + 49 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (5 \, A - 13 \, B + 85 \, C\right )} \cos \left (d x + c\right ) + 32 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{64 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}}, -\frac {\sqrt {2} {\left ({\left (5 \, A + 19 \, B - 75 \, C\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (5 \, A + 19 \, B - 75 \, C\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (5 \, A + 19 \, B - 75 \, C\right )} \cos \left (d x + c\right ) + 5 \, A + 19 \, B - 75 \, C\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) - 2 \, {\left ({\left (A - 9 \, B + 49 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (5 \, A - 13 \, B + 85 \, C\right )} \cos \left (d x + c\right ) + 32 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{32 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \sec ^{2}{\left (c + d x \right )}}{\left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{\frac {5}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.69, size = 311, normalized size = 1.74 \begin {gather*} \frac {\frac {\sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} {\left ({\left (\frac {2 \, {\left (\sqrt {2} A a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - \sqrt {2} B a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + \sqrt {2} C a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}{a^{8}} + \frac {\sqrt {2} A a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 9 \, \sqrt {2} B a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 17 \, \sqrt {2} C a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}{a^{8}}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \frac {3 \, \sqrt {2} A a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 11 \, \sqrt {2} B a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 83 \, \sqrt {2} C a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}{a^{8}}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a} - \frac {{\left (5 \, \sqrt {2} A + 19 \, \sqrt {2} B - 75 \, \sqrt {2} C\right )} \log \left ({\left | -\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} \right |}\right )}{\sqrt {-a} a^{2} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}}{32 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{{\cos \left (c+d\,x\right )}^2\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________